package com.chuji.crmcj.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.chuji.crmcj.R;
import com.chuji.crmcj.utils.UIUtils;

/**
 * Created by w.pitt on 2016/2/22.
 */
public class SecHisAdp extends BaseAdapter {
    private TextView history;

    public String[] mHisDatas;

    public SecHisAdp(String[] mHisData) {
        this.mHisDatas = mHisData;
    }

    @Override
    public int getCount() {
        return mHisDatas == null ? 0 : mHisDatas.length;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = View.inflate(UIUtils.getContext(), R.layout.item_sec_his, null);
            history = (TextView) convertView.findViewById(R.id.tv_sec_data);
        }
        history.setText(mHisDatas[position]);
        return convertView;
    }
}
